package com.njwb.day06.demo2;

//抽象类测试
public class Test {
    public static void main(String[] args) {
        狗 dog=new 狗();
        dog.name="哈士奇";
        dog.move();
        dog.eat("骨头");

        鸟 bird=new 鸟();
        bird.name="大雁";
        bird.move();
        bird.eat("虫子");

        狗 dog2=new 狗("金毛");
        System.out.println(dog2.name);
        dog2.eat("狗粮");
        dog2.move();
    }
}
